home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / qexe_203.zip / STRUCT.201 < prev    next >
Text File  |  1988-05-01  |  12KB  |  322 lines

  1.  
  2. QuickBBS Version 2.01 Structures Document
  3. =========================================
  4.  
  5. This file contains all of the data file structures used by the QuickBBS
  6. Version 2 series.  These are provided as a reference for utility writers
  7. to develop and test their programs for use with QuickBBS.
  8.  
  9. All "String[]" type variables are one byte bigger than specified, byte 0
  10. (the first byte) contains the length of the string.  The remaining of
  11. the string should be ignored, as it is not padded with nulls.
  12.  
  13.    Turbo Pascal Variable Type     C Language Var Type       Length
  14.    ===============================================================
  15.    Byte                        |  Char                   |  1 byte
  16.    Char                        |  Char                   |  1 byte
  17.    Integer                     |  Int                    |  2 bytes
  18.    Word                        |  Unsigned Int           |  2 bytes
  19.    LongInt                     |  Long                   |  4 bytes
  20.    Real                        |  [ None ]               |  6 bytes
  21.    ===============================================================
  22.  
  23. ==========================================================================
  24.  
  25. Type
  26.   FlagType = Array[1..4] of Byte;
  27.  
  28.   UserRecord = Record    { Used in the USERS.BBS File }
  29.                  Name:               String[35];
  30.                  City:               String[25];
  31.                  Pwd:                String[15];
  32.                  DataPhone,
  33.                  HomePhone:          String[12];
  34.                  LastTime:           String[5];
  35.                  LastDate:           String[8];
  36.                  Attrib:             Byte;
  37.                  Flags:              FlagType;
  38.                  Credit,
  39.                  Pending,
  40.                  TimesPosted,
  41.                  HighMsgRead,
  42.                  SecLvl,
  43.                  Times,
  44.                  Ups,
  45.                  Downs,
  46.                  UpK,
  47.                  DownK,
  48.                  TodayK,
  49.                  Elapsed,
  50.                  Len:                Integer;
  51.                  ExtraSpace:         Array[1..8] of Byte;
  52.                End;
  53.  
  54. (*  Attrib:
  55.  
  56.       Bit 0: Deleted
  57.       Bit 1: Screen Clear Codes
  58.       Bit 2: More Prompt
  59.       Bit 3: ANSI
  60.       Bit 4: No-Kill
  61.       Bit 5: Ignore Download Hours
  62.       Bit 6: ANSI Full Screen Editor
  63.       Bit 7: [ Reserved ]
  64.  
  65. *)
  66.  
  67. { Nodelist Records *************************************************** }
  68.  
  69.    NodeIdxRecord = Record  { Used for QNL_IDX.BBS file }
  70.                      Zone,
  71.                      Net,
  72.                      Node:      Integer;
  73.                      NodeType:  Byte;
  74.                    End;
  75.  
  76.    NodelistRecord = Record  { Used in QNL_DAT.BBS file }
  77.                       NodeType:  Byte;
  78.                       Zone,
  79.                       Net,
  80.                       Node:      Integer;
  81.                       Name:      String[20];
  82.                       City:      String[40];
  83.                       Phone:     String[40];
  84.                       Password:  String[8];
  85.                       Flags:     Integer;
  86.                       BaudRate:  Integer;
  87.                       Cost:      Integer;
  88.                     End;
  89.  
  90. (*  NodeType variable codes:
  91.  
  92.       0 = Normal Node
  93.       1 = Zone Coordinator
  94.       2 = Region Coordinator
  95.       3 = Net Coordinator
  96.       4 = Hub Coordinator
  97.  
  98. *)
  99.  
  100. { Message Records ******************************************************}
  101.  
  102.       InfoRecord = Record   { Used in the MSGINFO.BBS file }
  103.                      LowMsg:      Integer;     { Lowest Message in File }
  104.                      HighMsg:     Integer;     { Highest Message in File }
  105.  
  106.                      TotalActive: Integer;     { Total Active Messages }
  107.  
  108.                      ActiveMsgs:  Array[1..200] of Integer;
  109.                    End;
  110.  
  111.       IdxRecord = Record  { Used in the MSGIDX.BBS file }
  112.                     MsgNum:       Integer;
  113.                     Board:        Byte;
  114.                   End;
  115.  
  116.           HdrRecord = Record  { Used in the MSGHDR.BBS file }
  117.                         MsgNum,
  118.                         ReplyTo,
  119.                         SeeAlsoNum,
  120.                         TRead:              Integer;
  121.                         StartRec:           Word;
  122.                         NumRecs,
  123.                         DestNet,
  124.                         DestNode,
  125.                         OrigNet,
  126.                         OrigNode:           Integer;
  127.                         DestZone,
  128.                         OrigZone:           Byte;
  129.                         Cost:               Integer;
  130.                         MsgAttr,
  131.                         NetAttr,
  132.                         Board:              Byte;
  133.                         PostTime:           String[5];
  134.                         PostDate:           String[8];
  135.                         WhoTo,
  136.                         WhoFrom:            String[35];
  137.                         Subj:               String[72];
  138.                       End;
  139.  
  140.  
  141. (* Msg Attributes:
  142.  
  143.       Bit 0: Deleted
  144.       Bit 1: Unmoved Outgoing Net Message
  145.       Bit 2: Is a Net Mail Message
  146.       Bit 3: Private
  147.       Bit 4: Received
  148.       Bit 5: Unmoved Outgoing Echo Message
  149.       Bit 6: Local Bit
  150.       Bit 7: [ Reserved ]
  151.  
  152.    Net Attributes:
  153.  
  154.       Bit 0: Kill Message after it's been sent
  155.       Bit 1: Sent OK
  156.       Bit 2: File(s) Attached
  157.       Bit 3: Crash Priority
  158.       Bit 4: Request Receipt
  159.       Bit 5: Audit Request
  160.       Bit 6: Is a Return Receipt
  161.       Bit 7: [ Reserved ]
  162.  
  163.   Each record in the MSGTOIDX.BBS file is of type String[35], each entry
  164.   is simply the name of the corresponding message in MSGHDR.BBS is
  165.   addressed to.
  166.  
  167.   Each record in the MSGTXT.BBS file is of type String[255], each entry
  168.   is used to store blocks of message text.  The variable "StartRec" in
  169.   the MSGHDR.BBS file contains the starting record position for the
  170.   text, the variable "NumRecs" indicates how many consecutive blocks
  171.   of text there are in the MSGTXT.BBS file.
  172.  
  173. *)
  174.  
  175. { Other Stuff *********************************************************** }
  176.  
  177.   SysInfoRecord = Record  { Used in the SYSINFO.BBS file }
  178.                     CallCount:    LongInt;
  179.                     LastCaller:   String[35];
  180.                     ExtraSpace:   Array[1..128] of Byte;
  181.                   End;
  182.  
  183.   TimeLogRecord = Record  { Used in the TIMELOG.BBS file }
  184.                     StartDate:        String[8];
  185.                     BusyPerHour:      Array[0..23] of Integer;
  186.                     BusyPerDay:       Array[0..6] of Integer;
  187.                   End;
  188.  
  189.      MenuRecord = Record  { Used for all *.MNU files }
  190.                     Typ:      Byte;
  191.                     Sec:      Integer;
  192.                     Flags:    FlagType;
  193.                     Str:      String[75];
  194.                     Key:      Char;
  195.                     Data:     String[80];
  196.                     Fg,
  197.                     Bg:       Byte;
  198.                   End;
  199.  
  200. { Configuration Information ********************************************** }
  201.  
  202.       EventRecord = Record  { Part of Configuration Record }
  203.                       Status:       Byte; { 0=Deleted 1=Enabled 2=Disabled }
  204.                       RunTime:      String[5];
  205.                       ErrorLevel:   Byte;
  206.                       Days:         Byte;
  207.                       Forced:       Boolean;
  208.                       LastTimeRun:  String[8];
  209.                     End;
  210.  
  211.       BoardRecord = Record  { Part of Configuration Record }
  212.                       Name:         String[16];
  213.                       Typ:          Byte; { 0=Standard 1=Net 2=EMail 3=Echo }
  214.                       Kinds:        Byte; { 0=Both 1=Pvt 2=Pub 3=Read-Only }
  215.                       Combined:     Boolean;
  216.                       Aliases:      Boolean;
  217.  
  218.                       ReadSecLvl:   Integer;
  219.                       ReadFlags:    FlagType;
  220.  
  221.                       WriteSecLvl:  Integer;
  222.                       WriteFlags:   FlagType;
  223.  
  224.                       SysopSecLvl:  Integer;
  225.                       SysopFlags:   FlagType;
  226.                     End;
  227.  
  228.      ConfigRecord = Record  { Used for the CONFIG.BBS file }
  229.                       (*  Modem Parameters  *)
  230.                       CommPort:      Integer;
  231.                       InitBaud,
  232.                       InitTimes,
  233.                       AnswerWait:    Integer;
  234.                       ModemInitStr,
  235.                       ModemBusyStr:  String[70];
  236.                       ModemInitResp,
  237.                       ModemBusyResp,
  238.                       Resp300,
  239.                       Resp1200,
  240.                       Resp2400:      String[40];
  241.  
  242.                       (*  System Paths  *)
  243.                       MenuPath,
  244.                       TextPath,
  245.                       NetPath:      String[66];
  246.  
  247.                       (*  Restriction Parameters  *)
  248.                       MinBaud,
  249.                       GraphicsBaud,
  250.                       XferBaud:      Integer;
  251.                       LowBaudStart,
  252.                       LowBaudEnd,
  253.                       DownloadStart,
  254.                       DownloadEnd,
  255.                       PagingStart,
  256.                       PagingEnd:     String[5];
  257.  
  258.                       (*  Matrix Information  *)
  259.                       MatrixZone,
  260.                       MatrixNet,
  261.                       MatrixNode:    Integer;
  262.                       AkaNet,
  263.                       AkaNode:       Array[1..5] of Integer;
  264.                       NetMailBoard:  Integer;
  265.  
  266.                       (*  Default Information for New Users  *)
  267.                       DefaultSec:                Integer;
  268.                       DefaultCredit:             Integer;
  269.                       DefaultFlags:              FlagType;
  270.  
  271.                       (*  Sysop Security Levels  *)
  272.                       EditorCmdStr:    String[70];
  273.                       OriginLine:      String[60];
  274.                       SysopName:       String[35];
  275.                       AutoLogonChar,
  276.                       FastLogon,
  277.                       ScreenBlanking,
  278.                       UseLastRead,
  279.                       MonoMode,
  280.                       DirectWrite,
  281.                       SnowCheck,
  282.                       NetEchoExit,
  283.                       OneWordNames,
  284.                       CheckMail,
  285.                       AskHomePhone,
  286.                       AskDataPhone,
  287.                       GraphicsAvail:   Boolean;
  288.                       InactiveTimeOut: Integer;
  289.                       LogonTime:       Integer;
  290.                       DefFgColor:      Integer;
  291.                       DefBgColor:      Integer;
  292.                       PasswordTries:   Integer;
  293.                       MaxPageTimes:    Integer;
  294.                       PageBellLen:     Integer;
  295.  
  296.                       UseZoneGates:    Boolean;
  297.                       ExtraSpace:      Array[1..511] of Byte;
  298.  
  299.                       EventRec:        Array[1..30] of EventRecord;
  300.                       BoardRec:        Array[1..200] of BoardRecord;
  301.                     End;
  302.  
  303.   ExitRecord = Record  { Used for the EXITINFO.BBS file }
  304.                  BaudRate:        Integer;
  305.                  SysInfo:         SysInfoRecord;
  306.                  TimeLogInfo:     TimeLogRecord;
  307.                  UserInfo:        UserRecord;
  308.                  EventInfo:       EventRecord;
  309.                  NetMailEntered:  Boolean;
  310.                  EchoMailEntered: Boolean;
  311.                  LoginTime:       String[5];
  312.                  LoginDate:       String[8];
  313.                  TmLimit:         Integer;
  314.                  LoginSec:        LongInt;
  315.                  Credit:          LongInt;
  316.                  UserRecNum:      Integer;
  317.                  ReadThru:        Integer;
  318.                  PageTimes:       Integer;
  319.                  DownLimit:       Integer;
  320.                End;
  321.  
  322.